package design.structure.桥接;

/**
 * 桥接模式   20%
 */
abstract class AbstractComputer {
    ICpu cpu;

    AbstractComputer(ICpu cpu) {
        this.cpu = cpu;
    }

    protected abstract void changeCpu();

    public static void main(String[] args) {
        AbstractComputer computer1 = new ComputerAmd(new CpuAmd());

        computer1.cpu.depict();
        computer1.changeCpu();
        computer1.cpu.depict();

    }
}
